import http from '@/utils/http'
// import md5 from '../libs/md5';

export default {
  // 账号/密码登录
  userLogin(body) {
    return http({
      method: 'POST',
      showLoading: '登录中...',
      url: '/login',
      data: {
        ...body,
        // username,
        // password: md5(password)
      },
      needLogin: false,
    })
  },

  // 获取用户信息
  userInfo() {
    return http({
      url: '/user/info',
      needLogin: true,
    })
  },
}
